public class Test {

    public static void main(String[] args) {
        System.out.println(new B().getValue());
    }
    static class A {
        protected int value;
        public A(int v) {
            setValue(v);
        }

        public void setValue(int value) {
            this.value = value;
        }
        public int getValue() {
            try {
                value++;
            } catch (Exception e) {
                System.out.println(e.toString());
            } finally {
              this.setValue(value);
              System.out.println(value);
            }
            return value;
        }
    }
    static class B extends A {

        public B() {
            super(5);
            setValue(getValue()-3);
        }

        @Override
        public void setValue(int value) {
            super.setValue(2*value);
        }
    }
}

class Example {
    String str = new String("hello");
    char[] ch = {'a', 'b'};

    public static void main(String[] args) {
       Example ex = new Example();
//        ex.change(ex.str, ex.ch);
//        System.out.println(ex.str);
//        System.out.println(ex.ch);
        ((Example)null).change(ex.str, ex.ch);
    }

    public void change(String str, char[] ch) {
        str = "test ok";
        ch[0] = 'c';
    }
}
